package cn.kgc.javaweb.service;

import cn.kgc.javaweb.entity.User;
import cn.kgc.javaweb.form.UserLoginForm;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/5/15
 * @Description:  定义规范
 */
public interface UserService {
    HashMap<String, Object> register(String username, String password);

    HashMap<String, Object> login(UserLoginForm userLoginForm, HttpServletRequest req, HttpServletResponse resp);

    User getUserByUserName(String username);

    HashMap<String, Object> updateUser(User user);

    HashMap<String, Object> updatePwd(String username, String newPassword, String oldPassword);

    HashMap<String, Object> getList(Integer page, Integer limit);

    HashMap<String, Object> addUser(User user);

    HashMap<String, Object> updateUserByRoot(User user);

    HashMap<String, Object> deleteBatch(String[] ids);
}
